<?php

namespace app\common\model\lawyer;
use app\common\model\BaseModel;
use app\common\repositories\system\SystemCityRepository;

class Lawyer extends BaseModel
{

    public static function tablePK(): ?string
    {
        return 'lawyer_id';
    }

    public static function tableName(): string
    {
        return 'lawyer';
    }


    public function getCityAttr()
    {
        return app()->make(SystemCityRepository::class)->getCompleteAddress($this->city_id,' ');
    }


    public function getMainDoAttr($value)
    {
        return $value ? explode(',',$value) : [];
    }

}